package com.pb.kanivets.bki.spring.httpservices;

import com.pb.kanivets.bki.core.entities.Client;
import com.pb.kanivets.bki.core.services.IClientService;
import com.pb.kanivets.bki.core.wrappers.ListWrapper;
import java.util.List;
import org.springframework.stereotype.Component;

@Component
public class ClientHttpService implements IClientService{
    private final RestTemplateRequester requestor;

    public ClientHttpService() {
        this.requestor = new RestTemplateRequester();
    }
    
    
    
    @Override
    public List<Client> listClients() {        
        return requestor.doRequest("/clients/list", ListWrapper.class).getList();
    }

    @Override
    public Client getClient(int id) {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    @Override
    public void addClient(Client client) {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    @Override
    public void updateClient(Client newInfo) {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    @Override
    public void deleteClient(int id) {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    @Override
    public Client searchByInn(String inn) {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    @Override
    public Client searchByPassp(String passp) {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    @Override
    public List<Client> searchByFIO(String sName, String fName, String mName) {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }
    
}
